<?php 
 Class HumenController extends AppController{
 
 public $use = "human";
 public $scaffold ;
 public $autoLayout = true;
 public $layout = "human";
 

 function index(){
 	
 	
 	//$key =  $this -> data['human']['keyword'];
 	
 	echo 'hello--here is ctr-------';
	
 	//DB登録
	if(!empty($this -> data['human']['keyword'])){
		$name = $this -> data['human']['keyword'];
		echo '登録ボタンおされたよーー。';
 	$testArr['name1'] = $name;
	
	$this->Human->save($testArr);
	}
	
	//削除ボタン_
	if(!empty($this -> data['human']['delKey'])){
		$delKey= $this -> data['human']['delKey'];
		$this -> Human -> delete($delKey);
		
	}	
	//DB読み込み	
	
	$datas=	$this->Human->find("all");
	$this->set("data",$datas);
	$this->set("boy","unko");
	
	// form から入力された内容を取得
	//$key =  $this -> data['human']['keyword'];
	
	
	
	
	
	
 }
 
 //DB保存
 function create(){
 	
 		
 }
 
 
 
 function viewss(){
 	echo ' this is form action';
 }
 
 
 
 
 }
 
 ?>